gperftools: make libunwind dependency conditional
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Fri, 26 Sep 2025 18:21:36 +0000 (20:21 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Sat, 27 Sep 2025 16:58:18 +0000 (18:58 +0200)
Make libunwind support optional depending on package availability.

Previously, gperftools unconditionally enabled libunwind as
mandatory dependency, which led to build failures on architectures where
libunwind is not provided.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
libs/gperftools/Makefile

index d08f544db55bcc939d69ef3da7bf09b332c6f0b9..5279e5318fbcae274ff7da11d8055f403ffecab9 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gperftools
 PKG_VERSION:=2.17.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/gperftools/gperftools/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
@@ -34,7 +34,7 @@ define Package/gperftools-runtime
   CATEGORY:=Libraries
   TITLE:=Gperftools Runtime
   URL:=https://github.com/gperftools/gperftools
-  DEPENDS:= +libunwind +libstdcpp @!(powerpc)
+  DEPENDS:=+PACKAGE_libunwind:libunwind +libstdcpp @!(powerpc)
 endef
 
 define Package/gperftools-headers/description
@@ -49,7 +49,7 @@ endef
 
 CONFIGURE_ARGS += \
        --enable-frame-pointers \
-       --enable-libunwind \
+       $(if $(CONFIG_PACKAGE_libunwind),--enable-libunwind,--disable-libunwind) \
        --disable-deprecated-pprof
 
 define Build/InstallDev